#!/bin/bash
readonly FNAME='/proc/swaps'
[[ -r "$FNAME" ]] || exit 0
awk -- 'NR > 1 {TOTAL += $3; USED += $4}; END {print "generic,g,swap,0,1," USED / TOTAL}' "$FNAME"
